package com.example.todolist.commen

import com.example.todolist.R

enum class TodoImportance(val code: Int, val msg: String, val colorId: Int) {
    HIGH(1, "高", R.color.danger),
    MIDDLE(2, "中", R.color.warn),
    LOW(3, "低", R.color.save);

    companion object {
        @JvmStatic
        fun fromCode(code: Int): TodoImportance? {
            return TodoImportance.entries.find { it.code == code }
        }
    }


}